class Animal1{
    public  String name;
    public  int age;
    public Animal1(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void eat(){
        System.out.println(this.name+"正在吃饭！");
    }
}
class Dog1 extends Animal{
    public Dog1(String name,int age){
        //帮助初始化了子类从父类继承下来的成员变量
        super(name,age);
    }
    public void bark(){
        System.out.println(this.name+"汪汪叫！");
    }
}
/*class A{

}
class B extends A{

}
class C extends B{

}*/
public class Text {
    /*public static void main2(String[] args) {
        A a = new A();
        A a2 = new B();
        A a3 = new C();
    }*/
    public static void main1(String[] args) {
        Dog dog = new Dog("圆圆",19);
    }
}
